//登录
const fs=require('fs')
let user={username:"xm31",password:"333"}


let result= fs.readFileSync('persons.json','utf8')
result = JSON.parse(result )


var a= result.some(item => item.username == user.username && item.password == user.password 
 )   
    if(!a){
        console.log('用户名或密码错误') 
    } 
    else
    {console.log('登录成功') } 

